.class public Lcom/mobileapptracker/MobileAppTracker$getUserAgent;
.super Ljava/lang/Object;
.source "MobileAppTracker.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/mobileapptracker/MobileAppTracker;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "getUserAgent"
.end annotation


# instance fields
.field private context:Landroid/content/Context;

.field final synthetic this$0:Lcom/mobileapptracker/MobileAppTracker;


# direct methods
.method public constructor <init>(Lcom/mobileapptracker/MobileAppTracker;Landroid/content/Context;)V
    .locals 0
    .parameter
    .parameter "context"

    .prologue
    .line 831
    iput-object p1, p0, Lcom/mobileapptracker/MobileAppTracker$getUserAgent;->this$0:Lcom/mobileapptracker/MobileAppTracker;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 832
    iput-object p2, p0, Lcom/mobileapptracker/MobileAppTracker$getUserAgent;->context:Landroid/content/Context;

    .line 833
    return-void
.end method


# virtual methods
.method public run()V
    .locals 5

    .prologue
    .line 838
    :try_start_0
    new-instance v2, Landroid/webkit/WebView;

    iget-object v3, p0, Lcom/mobileapptracker/MobileAppTracker$getUserAgent;->context:Landroid/content/Context;

    invoke-direct {v2, v3}, Landroid/webkit/WebView;-><init>(Landroid/content/Context;)V

    .line 839
    .local v2, webview:Landroid/webkit/WebView;
    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 840
    invoke-virtual {v2}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v1

    .line 841
    .local v1, settings:Landroid/webkit/WebSettings;
    const/4 v3, 0x0

    invoke-virtual {v1, v3}, Landroid/webkit/WebSettings;->setAppCacheEnabled(Z)V

    .line 842
    const/4 v3, 0x2

    invoke-virtual {v1, v3}, Landroid/webkit/WebSettings;->setCacheMode(I)V

    .line 843
    const/4 v3, 0x0

    invoke-virtual {v1, v3}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    .line 844
    const/4 v3, 0x0

    invoke-virtual {v1, v3}, Landroid/webkit/WebSettings;->setSavePassword(Z)V

    .line 845
    iget-object v3, p0, Lcom/mobileapptracker/MobileAppTracker$getUserAgent;->this$0:Lcom/mobileapptracker/MobileAppTracker;

    invoke-virtual {v2}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v4

    invoke-virtual {v4}, Landroid/webkit/WebSettings;->getUserAgentString()Ljava/lang/String;

    move-result-object v4

    #calls: Lcom/mobileapptracker/MobileAppTracker;->setUserAgent(Ljava/lang/String;)V
    invoke-static {v3, v4}, Lcom/mobileapptracker/MobileAppTracker;->access$0(Lcom/mobileapptracker/MobileAppTracker;Ljava/lang/String;)V

    .line 846
    invoke-virtual {v2}, Landroid/webkit/WebView;->destroy()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 850
    .end local v1           #settings:Landroid/webkit/WebSettings;
    .end local v2           #webview:Landroid/webkit/WebView;
    :goto_0
    return-void

    .line 847
    :catch_0
    move-exception v0

    .line 848
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method
